import 'package:flutter/material.dart';
import 'package:shining_red_star/model/unique.dart';

import '../definitions/icon_font.dart';

class CountDucksAudInfo implements Unique {
  @override
  final String id;
  final String value;
  final String aud;

  const CountDucksAudInfo({
    required this.id,
    required this.value,
    required this.aud,
  });

  factory CountDucksAudInfo.fromJson(Map<String, dynamic> json) {
    return CountDucksAudInfo(
      id: json['id'],
      value: json['value'],
      aud: json['aud'],
    );
  }

  static List<CountDucksAudInfo> jsonToList(List<dynamic> json) {
    return json.map((item) => CountDucksAudInfo.fromJson(item)).toList();
  }
}

class DuckInfoState {
  FocusNode focusNode = FocusNode();
  IconFontValue duckIconData;
  final Rect rect;

  DuckInfoState({
    required this.duckIconData,
    required this.rect,
  });
}
